var loginByMobile = function(that,data){
	return new Promise((resolve, reject) => {
		that.$util.sendRequest(that,"app.h5.login","POST",1,data).then(res=>{resolve(res)}).catch(err=>{reject(err)});
	});
};
var loginByCaptcha = function(that,data){
	return new Promise((resolve, reject) => {
		that.$util.sendRequest(that,"app.aptcha.login","POST",1,data).then(res=>{resolve(res)}).catch(err=>{reject(err)});
	});
};
var getUserInfo = function(that){
	return new Promise((resolve, reject) => {
		that.$util.sendRequest(that,"app.mine.info","POST",1,null).then(res=>{resolve(res)}).catch(err=>{reject(err)});
	});
};
var setVal = function(that,data){
	return new Promise((resolve, reject) => {
		that.$util.sendRequest(that,"app.mine.edtInfo","POST",1,data).then(res=>{resolve(res)}).catch(err=>{reject(err)});
	});
};
var updateMobile = function(that,data){
	return new Promise((resolve, reject) => {
		that.$util.sendRequest(that,"app.user.info.update.mobile","POST",1,data).then(res=>{resolve(res)}).catch(err=>{reject(err)});
	});
};
var userBinding = function(that,data){
	return new Promise((resolve, reject) => {
		that.$util.sendRequest(that,"app.xcx.binding","POST",1,data).then(res=>{resolve(res)}).catch(err=>{reject(err)});
	});
};
var resetPwd = function(that,data){
	return new Promise((resolve, reject) => {
		that.$util.sendRequest(that,"app.mine.edt.pwd.bycaptcha","POST",1,data).then(res=>{resolve(res)}).catch(err=>{reject(err)});
	});
};
module.exports = {
	loginByMobile: loginByMobile,
	loginByCaptcha: loginByCaptcha,
	getUserInfo: getUserInfo,
	setVal: setVal,
	updateMobile: updateMobile,
	userBinding: userBinding,
	resetPwd: resetPwd
}
